<%--

/*
- * @description: 更改商品信息
- * @author: huangchuting
- * @update: huangchuting (2021/1/10 18:06)
- */--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>校园租赁-更改商品信息</title>
</head>
<link rel="stylesheet" href="/static/css/publish.css">
<style>
    .itemImg img{
        height: 80px;
        width: 80px;
    }

</style>
<body>
<c:import url="../public/head.jsp"></c:import>
<script>
    shop.innerHTML = '<span style="color: red">·&#12288;更改商品信息</span>'
</script>
<div class="divWarp">
    <div class="publishWarp">
        <form class="publishForm" method="post" enctype="multipart/form-data" action="/Item/updateItem">
            <input type="hidden" value="${itemNew.item_id}" name="item_id">
            <table>
                <tr>
                    <td><span>商品名称：</span></td>
                    <td><input type="text" name="item_name" value="${itemNew.item_name}"></td>
                </tr>
                <tr>
                    <td><span>商品类型：</span></td>
                    <td>
                        <select name="type">
                            <c:if test="${itemNew.type=='图书教材'}">
                                <option value="图书教材" selected="selected">图书教材</option>
                                <option value="美妆衣物">美妆衣物</option>
                                <option value="数码电器">数码电器</option>
                                <option value="快递跑腿">快递跑腿</option>
                                <option value="生活用品">生活用品</option>
                                <option value="票卷小物">票卷小物</option>
                            </c:if>
                            <c:if test="${itemNew.type=='美妆衣物'}">
                                <option value="美妆衣物" selected="selected">美妆衣物</option>
                                <option value="图书教材">图书教材</option>
                                <option value="数码电器">数码电器</option>
                                <option value="快递跑腿">快递跑腿</option>
                                <option value="生活用品">生活用品</option>
                                <option value="票卷小物">票卷小物</option
                            </c:if>
                            <c:if test="${itemNew.type=='数码电器'}">
                                <option value="数码电器" selected="selected">数码电器</option>
                                <option value="图书教材">图书教材</option>
                                <option value="美妆衣物">美妆衣物</option>
                                <option value="快递跑腿">快递跑腿</option>
                                <option value="生活用品">生活用品</option>
                                <option value="票卷小物">票卷小物</option>
                            </c:if>
                            <c:if test="${itemNew.type=='快递跑腿'}">
                                <option value="快递跑腿" selected="selected">快递跑腿</option>
                                <option value="图书教材">图书教材</option>
                                <option value="美妆衣物">美妆衣物</option>
                                <option value="数码电器">数码电器</option>
                                <option value="生活用品">生活用品</option>
                                <option value="票卷小物">票卷小物</option>
                            </c:if>
                            <c:if test="${itemNew.type=='生活用品'}">
                                <option value="生活用品" selected="selected">生活用品</option>
                                <option value="图书教材">图书教材</option>
                                <option value="美妆衣物">美妆衣物</option>
                                <option value="数码电器">数码电器</option>
                                <option value="快递跑腿">快递跑腿</option>
                                <option value="票卷小物">票卷小物</option>
                            </c:if>
                            <c:if test="${itemNew.type=='票卷小物'}">
                                <option value="票卷小物" selected="selected">票卷小物</option>
                                <option value="图书教材">图书教材</option>
                                <option value="美妆衣物">美妆衣物</option>
                                <option value="数码电器">数码电器</option>
                                <option value="快递跑腿">快递跑腿</option>
                                <option value="生活用品">生活用品</option>
                            </c:if>

                        </select>
                    </td>
                </tr>
                <tr>
                    <td><span>商品价格：</span></td>
                    <td><input type="text" name="price" value="${itemNew.price}"></td>
                </tr>
                <tr>
                    <td><span>商品介绍：</span></td>
                    <td>
                        <textarea name="introduction">${itemNew.introduction}</textarea>
                    </td>
                </tr>
                <tr>
                    <td><span>商品图片：</span></td>
                    <td class="itemImg">
                        <img src="/static/images/item/${itemNew.image}">
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <input type="submit" name="publishBut" class="publishBut" value="提交信息更改">
                    </td>
                </tr>
            </table>

        </form>
    </div>
</div>

</body>
</html>